public class Dog {
    private String name;
    private int age;
    private String hobby;
    private Dog(){
        System.out.println("无参构造器执行~~");
    }
    private Dog(String name){
        this.name = name;
        System.out.println("一个参数的有参构造器执行~~");
    }
    public Dog(String name,int age){
        this.name = name;
        this.age = age;
        System.out.println("两个参数的有参构造器执行~~");
    }
    public void eat(){
        System.out.println("吃吃吃");
    }
    public void eat(String food){
        System.out.println("吃吃吃"+ food);
    }
}
